# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DisplayVideo.V3.Model.GuaranteedOrderStatus do
  @moduledoc """
  The status settings of the guaranteed order.

  ## Attributes

  *   `configStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The configuration status of the guaranteed order. Acceptable values are `PENDING` and `COMPLETED`. A guaranteed order must be configured (fill in the required fields, choose creatives, and select a default campaign) before it can serve. Currently the configuration action can only be performed via UI.
  *   `entityPauseReason` (*type:* `String.t`, *default:* `nil`) - The user-provided reason for pausing this guaranteed order. Must be UTF-8 encoded with a maximum length of 100 bytes. Only applicable when entity_status is set to `ENTITY_STATUS_PAUSED`.
  *   `entityStatus` (*type:* `String.t`, *default:* `nil`) - Whether or not the guaranteed order is servable. Acceptable values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. Default value is `ENTITY_STATUS_ACTIVE`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :configStatus => String.t() | nil,
          :entityPauseReason => String.t() | nil,
          :entityStatus => String.t() | nil
        }

  field(:configStatus)
  field(:entityPauseReason)
  field(:entityStatus)
end

defimpl Poison.Decoder, for: GoogleApi.DisplayVideo.V3.Model.GuaranteedOrderStatus do
  def decode(value, options) do
    GoogleApi.DisplayVideo.V3.Model.GuaranteedOrderStatus.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DisplayVideo.V3.Model.GuaranteedOrderStatus do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
